package com.autonavi.yunda.yunji.groovy

import com.autonavi.yunda.yunji.core.engine.handler.HttpHandler

/**
 * @author cizhong.wcs
 * @date 2023/9/5 17:26
 */
class AdminGroovyUtil {
    /**
     * 完整带前缀0工号
     */
    static Map<String, String> searchUser(String empId) {
        def res = HttpHandler.httpGet("https://falcon.amap.com/api/v1/user/search?key=${empId}")
        if (res.success && res.content.size() > 0 && res.content[0].workNo == empId) {
            return res.content[0];
        }
        return null
    }
}
